# Maintainer: Przemyslaw Pawelczyk <przemoc@zoho.com>
pkgname=rhash
pkgver=1.4.0
pkgrel=0
pkgdesc="Utility for calculation and verification of hash sums and magnet links"
url="http://rhash.anz.ru"
arch="all"
license="0BSD"
makedepends="openssl-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
source="https://downloads.sourceforge.net/rhash/rhash-$pkgver-src.tar.gz
	byteorder.patch"
builddir="$srcdir/RHash-$pkgver"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-openssl \
		--disable-openssl-runtime
	make
}

check() {
	make -C "$builddir" test-shared
}

package() {
	make DESTDIR="$pkgdir" install
	make DESTDIR="$pkgdir" \
		install-lib-headers install-lib-shared install-lib-so-link
}

sha512sums="2f02487fffe8d1bc70c4454829bbd250a15fbd09db5ef85c54d3e8ad1008e84616ea54483292deae45047a27964e27b26d9b3da8447e7c37dac1e2ce18a63a07  rhash-1.4.0-src.tar.gz
a216a7cf5e1ea5fcb7b574a57bb8137e3dc0251bdefb2c30aacba08c54079d61a595c8c5636687c70e14724efa3a4b9ca7d9f98d9170eaa66ccb278834cf56d5  byteorder.patch"
